package edu.sctu.practice.class01.renpingan.assign01.rational;

/**
 * Created by Administrator on 2015/10/8.
 */
public class Rational {
    public int number1;
    public int number2;
    public Rational(int number1,int number2){
        this.number1 = number1;
        this.number2 = number2;

    }
    //加法
    public int plus() {
        int sum = number1+number2;
        System.out.println("两数之和"+sum);
        return sum;
    }

    //减法
    public int reduce() {
        int reducing = number1-number2;
        System.out.println("两数之差"+reducing);
        return reducing;
    }

    //乘法
    public int times() {
        int times = number1*number2;
        System.out.println("两数之积"+times);
        return times;
    }

    //除法
    public int division() {
        int division = number1/number2;
        System.out.println("两数相除"+division);
        return division;
    }

public void account(){
    plus();
    reduce();
    times();
    division();
}

}
